// 带标签的模板字符串
//就是对字符串进行加工
const name = 'tom'
const gender = true

// const str = console.log`hey,${name}is a ${gender}`
const {log} = console
// log(str)

const str = myTagFunc`hey,${name}is a ${gender}.`
function myTagFunc(string, name, gender) {
    
    const sex = gender? 'man' : 'woman';
    return string[0]+ name + string[1] + sex + string[2]
}
log(str)